#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int num0fone(int n)
{
	int i = 0;
	int count = 0;
	for (i = 0; i < 32; i++)
	{
		int a = 1;
		if ((a & (n >> i))== 1)
			count++;
	}
	return count;
}
int main()
{
	int a = 0;
	int b = 0;
	scanf("%d %d", &a, &b);
	printf("%d",num0fone(a ^ b));
	
	return 0;
}